package itdep.domain.education;

import itdep.domain.IisEntity;
import itdep.domain.division.Employee;
import org.hibernate.annotations.Parameter;
import org.hibernate.annotations.Type;

import javax.persistence.*;
import java.util.Date;

/**
 * todo: what is createDate, finishDate, passDate?
 *
 * @author Ivan Khalopik
 * @version $Revision: 13 $ $Date: 2010-06-16 13:04:42 +0000 (Wed, 16 Jun 2010) $
 */
@Entity
@Table(name = "MARK_SHEET")
public class MarkSheet extends IisEntity {

	@Column(name = "SHEET_NUMBER", nullable = true)
	private String sheetNumber;

	@ManyToOne
	@JoinColumn(name = "ID_EDUCATION_PLAN", nullable = false)
	private EducationPlan educationPlan;

	@Type(type = "ga.hibernate.OrderedEnumUserType", parameters = {@Parameter(name = "enumClass", value = "itdep.domain.education.ControlType")})
	@Column(name = "CONTROL_TYPE", nullable = true)
	private ControlType controlType;

	@Column(name = "CREATE_DATE", nullable = true, insertable = true, updatable = true)
	private Date createDate;

	@Column(name = "FINISH_DATE", nullable = true, insertable = true, updatable = true)
	private Date finishDate;

	@Column(name = "PASS_DATE", nullable = true, insertable = true, updatable = true)
	private Date passDate;

	@ManyToOne
	@JoinColumn(name = "ID_EXAMINER", nullable = false)
	private Employee examiner;

	public String getSheetNumber() {
		return sheetNumber;
	}

	public void setSheetNumber(String sheetNumber) {
		this.sheetNumber = sheetNumber;
	}

	public EducationPlan getEducationPlan() {
		return educationPlan;
	}

	public void setEducationPlan(EducationPlan educationPlan) {
		this.educationPlan = educationPlan;
	}

	public ControlType getControlType() {
		return controlType;
	}

	public void setControlType(ControlType controlType) {
		this.controlType = controlType;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Date getFinishDate() {
		return finishDate;
	}

	public void setFinishDate(Date finishDate) {
		this.finishDate = finishDate;
	}

	public Date getPassDate() {
		return passDate;
	}

	public void setPassDate(Date passDate) {
		this.passDate = passDate;
	}

	public Employee getExaminer() {
		return examiner;
	}

	public void setExaminer(Employee examiner) {
		this.examiner = examiner;
	}
}